module.exports = app => {
    const {router, controller} = app
    const adminauth = app.middleware.adminauth()
    router.get('/admin/index', adminauth, controller.admin.main.index)
    router.post('/admin/checkLogin', adminauth, controller.admin.main.checkLogin) // 检查登录
    router.get('/admin/getTypeInfo', adminauth, controller.admin.main.getTypeInfo) // 获取类型
    router.post('/admin/addArticle', adminauth, controller.admin.main.addArticle) // 添加文章
    router.post('/admin/updateArticle', adminauth, controller.admin.main.updateArticle) // 添加文章
    router.get('/admin/getArticleList', adminauth, controller.admin.main.getArticleList) // 添加文章
    router.get('/admin/delArticle/:id', adminauth, controller.admin.main.delArticle) // 删除文章
    router.get('/admin/getArticleById/:id', adminauth, controller.admin.main.getArticleById) // 删除文章
}
